Skip to content

Instantly share code, notes, and snippets.

@ShyamaSankar
ShyamaSankar / python_lists.py
Last active May 12, 2024 09:44
Python lists
# Create an empty list using square brackets.
numbers = []
print(numbers) # Output: []
# Create an empty list using list().
numbers = list()
print(numbers) # Output: []
# Create a list of numbers.
numbers = [1, 2, 3]
@joelonsql
joelonsql / PostgreSQL-EXTENSIONs.md
Last active May 12, 2024 09:42
1000+ PostgreSQL EXTENSIONs

🗺🐘 1000+ PostgreSQL EXTENSIONs

This is a list of URLs to PostgreSQL EXTENSION repos, listed in alphabetical order of parent repo, with active forks listed under each parent.

⭐️ >= 10 stars
⭐️⭐️ >= 100 stars
⭐️⭐️⭐️ >= 1000 stars
Numbers of stars might not be up-to-date.

@ShyamaSankar
ShyamaSankar / python_tuples.py
Last active May 12, 2024 09:41
Cheat sheet for Python tuples
#### Tuple creation #####
# Create a tuple, also called tuple packing.
numbers = 1, 2
print(numbers) # Output: (1, 2) <- Note that it is represented with an enclosing paranthesis
# Create tuple with paranthesis.
numbers = (1, 2, 3)
print(numbers) # Output: (1, 2, 3)
# Create an empty tuple.
numbers = ()
print(numbers) # Output: ()
@rupeshtiwari
rupeshtiwari / mac terminal theme customize mac os terminal command line zsh.md
Last active May 12, 2024 09:31
install oh my zsh on macos | change terminal theme on macos | Change console theme on macos

How to customize mac os terminal using oh my zsh

Step1: download & install oh-my-zsh via curl

  • sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Note: if you already have folder then delete it running rm -r /Users/rupeshti/.oh-my-zsh

Step2 Open Zshrc file

@xiabingquan
xiabingquan / flash_attention_in_numpy.py
Last active May 12, 2024 09:22
An toy example of flash attention implemented with Numpy.
# A minimal exmaple of flash attention implemented in Numpy
# Contact: bingquanxia AT qq.com
import unittest
from typing import List
import numpy as np
import torch
@ctrl-freak
ctrl-freak / android-adb-pull-apk.md
Last active May 12, 2024 09:22
Retrieve APK from Non-Rooted Android Device through ADB

https://stackoverflow.com/a/18003462/348146

None of these suggestions worked for me, because Android was appending a sequence number to the package name to produce the final APK file name (this may vary with the version of Android OS). The following sequence of commands is what worked for me on a non-rooted device:

  1. Determine the package name of the app, e.g. com.example.someapp. Skip this step if you already know the package name.

    adb shell pm list packages

    Look through the list of package names and try to find a match between the app in question and the package name. This is usually easy, but note that the package name can be completely unrelated to the app name. If you can't recognize the app from the list of package names, try finding the app in Google Play using a browser. The URL for an app in Google Play contains the package name.

@gwpantazes
gwpantazes / How to Install JDK MacOS Homebrew.md
Last active May 12, 2024 09:21
How to install different JDK versions on MacOS with Homebrew

How To Install Different JDK Versions on MacOS with Homebrew

Keywords: Java, JDK (Java Development Kit), MacOS, Homebrew, Specific Version

This how-to guide covers how to install different versions of the JDK on MacOS with Homebrew.

Table of Contents

@adisbladis
adisbladis / podman-shell.nix
Last active May 12, 2024 09:21
Use podman within a nix-shell
{ pkgs ? import <nixpkgs> {} }:
let
# To use this shell.nix on NixOS your user needs to be configured as such:
# users.extraUsers.adisbladis = {
# subUidRanges = [{ startUid = 100000; count = 65536; }];
# subGidRanges = [{ startGid = 100000; count = 65536; }];
# };
@alejandro-martin
alejandro-martin / multiple-ssh-keys-git.adoc
Last active May 12, 2024 09:20
Configure multiple SSH Keys for Git

Use Multiple SSH Keys for Git host websites (Github, Gitlab)

This is guide about how to configure multiple SSH keys for some Git host websites such as Github, Gitlab, among others.

Creating SSH keys

  1. Create SSH directory:

@fawazahmed0
fawazahmed0 / breach.txt
Last active May 12, 2024 09:19
Email and password breach collection list
# Please Note, I am sharing this, hoping this will be used for good public use, such as data analysis, penetration testing etc
# These links are already available all over the internet
# Also Note, Trying to login into someone else's account without their permission is unethical and illegal
# Collection 1
magnet:?xt=urn:btih:B39C603C7E18DB8262067C5926E7D5EA5D20E12E&dn=Collection%201&tr=udp%3a%2f%2ftracker.coppersurfer.tk%3a6969%2fannounce&tr=udp%3a%2f%2ftracker.leechers-paradise.org%3a6969%2fannounce&tr=http%3a%2f%2ft.nyaatracker.com%3a80%2fannounce&tr=http%3a%2f%2fopentracker.xyz%3a80%2fannounce
# Collection 2-5 & Antipublic
magnet:?xt=urn:btih:D136B1ADDE531F38311FBF43FB96FC26DF1A34CD&dn=Collection%20%232-%235%20%26%20Antipublic&tr=udp%3a%2f%2ftracker.coppersurfer.tk%3a6969%2fannounce&tr=udp%3a%2f%2ftracker.leechers-paradise.org%3a6969%2fannounce&tr=http%3a%2f%2ft.nyaatracker.com%3a80%2fannounce&tr=http%3a%2f%2fopentracker.xyz%3a80%2fannounce